package com.zfast.yugioh.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zfast.forge.valid.Create;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;


/**
 * 用户
 *
 * @author zgn
 * @email 
 * @date 2022-06-10 15:13:23
 */
@Data
@SuperBuilder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_sys_user")
@ApiModel(value = "User", description = "用户")
public class User implements Serializable{
    private static final long serialVersionUID=1L;

    @Id
    @Column(name = "id")
    @ApiModelProperty("主键")
    @NotNull(message = "主键不可为空", groups = {Create.class})
    private Integer id;

    @Column(name = "acount")
    @ApiModelProperty("账号")
    @NotNull(message = "账号不可为空", groups = {Create.class})
    private String acount;

    @Column(name = "nickname")
    @ApiModelProperty("昵称")
    @NotNull(message = "昵称不可为空", groups = {Create.class})
    private String nickname;

    @Column(name = "password")
    @ApiModelProperty("密码")
    private String password;

    @Column(name = "email")
    @ApiModelProperty("邮箱")
    private String email;

    @Column(name = "phone")
    @ApiModelProperty("手机号")
    private String phone;

    @Column(name = "level")
    @ApiModelProperty("等级")
    @NotNull(message = "等级不可为空", groups = {Create.class})
    private Integer level;

    @Column(name = "exp")
    @ApiModelProperty("经验")
    @NotNull(message = "经验不可为空", groups = {Create.class})
    private Integer exp;

    @Column(name = "card_num")
    @ApiModelProperty("卡牌数")
    @NotNull(message = "卡牌数不可为空", groups = {Create.class})
    private Integer cardNum;

    @Column(name = "enable_flag")
    @ApiModelProperty("删除标志0:无;1有")
    @NotNull(message = "删除标志0:无;1有不可为空", groups = {Create.class})
    private Boolean enableFlag;

    @Transient
    @ApiModelProperty("模糊查询字段")
    private String whe;
}
